import DS from 'ember-data';
import BaseModel from './base-model';

var worktimesetting = BaseModel.extend({
  name:DS.attr('string'),//名称
  createDateTime:DS.attr('number'),//创建时间
  createUser:DS.belongsTo('user'),//创建人
  lastUpdateDateTime:DS.attr('number'),//更新时间
  lastUpdateUser:DS.belongsTo('user'),//更新人
  startTime:DS.attr('string'),//开始时间
  endTime:DS.attr('string'),//结束时间
  remark:DS.attr('string'),//备注
  // floor:DS.hasmany('floor')
  // dateService: Ember.inject.service("date-service"),

  // startTimeDate:Ember.computed("startTime",function(){
  //   var startTime=this.get("startTime");
  //   if(!startTime){
  //     return null;
  //   }
  //   return this.get("dateService").timestampToTime(startTime);
  // }),
  // startTimeString:Ember.computed("startTime",function(){
  //   var startTime=this.get("startTime");
  //   return this.get("dateService").formatDate(startTime,"yyyy-MM-dd hh:mm:ss");
  //   }),
  //
  // endTimeDate:Ember.computed("endTime",function(){
  //     var endTime=this.get("endTime");
  //     if(!endTime){
  //       return null;
  //     }
  //     return this.get("dateService").timestampToTime(endTime);
  //   }),
  // endTimeString:Ember.computed("endTime",function(){
  //     var endTime=this.get("endTime");
  //     return this.get("dateService").formatDate(endTime,"yyyy-MM-dd hh:mm:ss");
  //   }),
});

export default worktimesetting;
